﻿using System.Windows.Forms;
using System.IO;
using System.Security.Principal;

namespace VisualPureBasicIDE.CoreGUI
{
    static class InvariantStrings
    {
        public const string AboutText = "Visual PureBasic IDE - a professional IDE for PureBasic" +
                                        "\nCopyright © 2009 The Visual PureBasic IDE development team" +
                                        "\n\nPortions copyright © 2008 Weifen Luo" +
                                        "\n\nPortions copyright © 2002-2006 Garrett Serack <gserack@gmail.com>" +
                                        "\n\nIcons copyright © 1985 - 2008 Microsoft" +
                                        "\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.";

        public static string DockLayoutFilePath = Path.Combine(Application.CommonAppDataPath, "DockLayout.xml");
        public static string PluginPath = Path.Combine(Application.StartupPath, "plugins");
        public static string SmtpServer = "smtp.googlemail.com";
        public static string LoginName = "bugs.vpbide@googlemail.com";
        public static string Password = "wawuko34";
        public static string ErrorEmail = "bugs.vpbide@googlemail.com";

        public static bool AdministratorRights
        {
            get
            {
                var wp = new WindowsPrincipal(WindowsIdentity.GetCurrent());

                // This checks for local administrator rights
                return wp.IsInRole(WindowsBuiltInRole.Administrator);
            }
        }
    }
}